﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// wx_userinfo_main数据模型对象
    /// </summary>
    [Serializable]
    public partial class wx_userinfo_mainMod
    {
        /// <summary>
        /// 初始化wx_userinfo_main数据模型对象
        /// </summary>
        public wx_userinfo_mainMod()
        {
            
        }
        /// <summary>
        /// 初始化wx_userinfo_main数据模型对象并给在SQL中不能为空的字段赋值
        /// </summary>
        /// <param name="open_id">open_id</param>
        /// <param name="id_num">id_num</param>
        /// <param name="position">position</param>
        /// <param name="birth">birth</param>
        /// <param name="gender">gender</param>
        /// <param name="name">name</param>
        /// <param name="create_time">create_time</param>
        /// <param name="deleted">deleted</param>
        /// <param name="id">id</param>
        public wx_userinfo_mainMod(string open_id,string id_num,string position,string birth,string gender,string name,DateTime create_time,int deleted,int id)
        {
            //给open_id字段赋值
            this.Open_id = open_id;
            //给id_num字段赋值
            this.Id_num = id_num;
            //给position字段赋值
            this.Position = position;
            //给birth字段赋值
            this.Birth = birth;
            //给gender字段赋值
            this.Gender = gender;
            //给name字段赋值
            this.Name = name;
            //给create_time字段赋值
            this.Create_time = create_time;
            //给deleted字段赋值
            this.Deleted = deleted;
            //给id字段赋值
            this.Id = id;
        }
        /// <summary>
        /// 初始化wx_userinfo_main数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="open_id">open_id</param>
        /// <param name="id_num">id_num</param>
        /// <param name="position">position</param>
        /// <param name="birth">birth</param>
        /// <param name="gender">gender</param>
        /// <param name="car_num">car_num</param>
        /// <param name="device_num">device_num</param>
        /// <param name="name">name</param>
        /// <param name="create_time">create_time</param>
        /// <param name="deleted">deleted</param>
        /// <param name="id">id</param>
        public wx_userinfo_mainMod(string open_id,string id_num,string position,string birth,string gender,string car_num,string device_num,string name,DateTime create_time,int deleted,int id)
        {
            //给open_id字段赋值
            this.Open_id = open_id;
            //给id_num字段赋值
            this.Id_num = id_num;
            //给position字段赋值
            this.Position = position;
            //给birth字段赋值
            this.Birth = birth;
            //给gender字段赋值
            this.Gender = gender;
            //给car_num字段赋值
            this.Car_num = car_num;
            //给device_num字段赋值
            this.Device_num = device_num;
            //给name字段赋值
            this.Name = name;
            //给create_time字段赋值
            this.Create_time = create_time;
            //给deleted字段赋值
            this.Deleted = deleted;
            //给id字段赋值
            this.Id = id;
        }
        
		//属性存储数据的变量
        private string _open_id;
        private string _id_num;
        private string _position;
        private string _birth;
        private string _gender;
        private string _car_num;
        private string _device_num;
        private string _name;
        private DateTime _create_time;
        private int _deleted;
        private int _id;
        
        /// <summary>
        /// open_id
        /// </summary>
        public string Open_id
        {
            get { return this._open_id; }
            set { this._open_id = value; }
        }
        /// <summary>
        /// id_num
        /// </summary>
        public string Id_num
        {
            get { return this._id_num; }
            set { this._id_num = value; }
        }
        /// <summary>
        /// position
        /// </summary>
        public string Position
        {
            get { return this._position; }
            set { this._position = value; }
        }
        /// <summary>
        /// birth
        /// </summary>
        public string Birth
        {
            get { return this._birth; }
            set { this._birth = value; }
        }
        /// <summary>
        /// gender
        /// </summary>
        public string Gender
        {
            get { return this._gender; }
            set { this._gender = value; }
        }
        /// <summary>
        /// car_num
        /// </summary>
        public string Car_num
        {
            get { return this._car_num; }
            set { this._car_num = value; }
        }
        /// <summary>
        /// device_num
        /// </summary>
        public string Device_num
        {
            get { return this._device_num; }
            set { this._device_num = value; }
        }
        /// <summary>
        /// name
        /// </summary>
        public string Name
        {
            get { return this._name; }
            set { this._name = value; }
        }
        /// <summary>
        /// create_time
        /// </summary>
        public DateTime Create_time
        {
            get { return this._create_time; }
            set { this._create_time = value; }
        }
        /// <summary>
        /// deleted
        /// </summary>
        public int Deleted
        {
            get { return this._deleted; }
            set { this._deleted = value; }
        }
        /// <summary>
        /// id
        /// </summary>
        public int Id
        {
            get { return this._id; }
            set { this._id = value; }
        }
        
        /// <summary>
        /// 对比两个wx_userinfo_main数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的wx_userinfo_main数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成wx_userinfo_main数据模型对象
            wx_userinfo_mainMod wx_userinfo_mainMod = obj as wx_userinfo_mainMod;
            //判断是否转换成功
            if (wx_userinfo_mainMod == null) return false;
            //进行匹配属性的值
            return
                //判断open_id是否一致
                this.Open_id == wx_userinfo_mainMod.Open_id &&
                //判断id_num是否一致
                this.Id_num == wx_userinfo_mainMod.Id_num &&
                //判断position是否一致
                this.Position == wx_userinfo_mainMod.Position &&
                //判断birth是否一致
                this.Birth == wx_userinfo_mainMod.Birth &&
                //判断gender是否一致
                this.Gender == wx_userinfo_mainMod.Gender &&
                //判断car_num是否一致
                this.Car_num == wx_userinfo_mainMod.Car_num &&
                //判断device_num是否一致
                this.Device_num == wx_userinfo_mainMod.Device_num &&
                //判断name是否一致
                this.Name == wx_userinfo_mainMod.Name &&
                //判断create_time是否一致
                this.Create_time == wx_userinfo_mainMod.Create_time &&
                //判断deleted是否一致
                this.Deleted == wx_userinfo_mainMod.Deleted &&
                //判断id是否一致
                this.Id == wx_userinfo_mainMod.Id;
        }
        /// <summary>
        /// 将当前wx_userinfo_main数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将wx_userinfo_main数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将open_id进行按位异或运算处理
                (this.Open_id == null ? 2147483647 : this.Open_id.GetHashCode()) ^
                //将id_num进行按位异或运算处理
                (this.Id_num == null ? 2147483647 : this.Id_num.GetHashCode()) ^
                //将position进行按位异或运算处理
                (this.Position == null ? 2147483647 : this.Position.GetHashCode()) ^
                //将birth进行按位异或运算处理
                (this.Birth == null ? 2147483647 : this.Birth.GetHashCode()) ^
                //将gender进行按位异或运算处理
                (this.Gender == null ? 2147483647 : this.Gender.GetHashCode()) ^
                //将car_num进行按位异或运算处理
                (this.Car_num == null ? 2147483647 : this.Car_num.GetHashCode()) ^
                //将device_num进行按位异或运算处理
                (this.Device_num == null ? 2147483647 : this.Device_num.GetHashCode()) ^
                //将name进行按位异或运算处理
                (this.Name == null ? 2147483647 : this.Name.GetHashCode()) ^
                //将create_time进行按位异或运算处理
                this.Create_time.GetHashCode() ^
                //将deleted进行按位异或运算处理
                this.Deleted.GetHashCode() ^
                //将id进行按位异或运算处理
                this.Id.GetHashCode();
        }
        /// <summary>
        /// 将当前wx_userinfo_main数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前wx_userinfo_main数据模型对象转换成字符串副本
            return
                "[" +
                //将open_id转换成字符串
                this.Open_id + "," +
                //将id_num转换成字符串
                this.Id_num + "," +
                //将position转换成字符串
                this.Position + "," +
                //将birth转换成字符串
                this.Birth + "," +
                //将gender转换成字符串
                this.Gender + "," +
                //将name转换成字符串
                this.Name + "," +
                //将create_time转换成字符串
                this.Create_time + "," +
                //将deleted转换成字符串
                this.Deleted + "," +
                //将id转换成字符串
                this.Id +
                "]";
        }
    }
}
